import React, { useCallback, useMemo, useState } from "react";
import "./index.less";
import { useModel } from "umi";

// import PubSub from 'pubsub-js'; // 组件互相通讯的插件

const FormsTitle = React.forwardRef((props: any, ref) => {
    const { initialState } = useModel('@@initialState');
    const { dbname } = initialState?.curPart as API.CurPart;
    const { tabsData } = props;

    return (<>{
        useMemo(() => {
            return (<div className="formsHeader">
                <div className="formTitle">{tabsData.tabsTitle}</div>
                <div className="formTabHeader">
                    <div>编制单位：{initialState?.curPart.zcbfName}</div>
                    <div>单位：人民币元 </div>
                </div>
            </div>)
        }, [tabsData])
    }</>)
})
export default FormsTitle;